package com.lgx.authorize.module.service.impl;

import java.sql.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import com.lgx.authorize.module.dao.IApplicationApplyKeyInfoDao;
import com.lgx.authorize.module.entity.ApplicationApplykeyInfo;
import com.lgx.authorize.module.service.IApplicationApplykeyInfoService;

@Service("applicationApplykeyInfoService")
@Configurable
public class ApplicationApplykeyInfoService implements
		IApplicationApplykeyInfoService {
	
	@Autowired
	private IApplicationApplyKeyInfoDao applicationApplyKeyInfoDao;
	
	@Value("${authorize.disable.interrupt.mins}")
	private String disableInterr;
	
	@Value("${authorize.refresh.interrupt.mins}")
	private String refreshIterr;

	@Override
	public void createApplicationApplykeyInfo(
			ApplicationApplykeyInfo applicationApplykeyInfo) {
		applicationApplyKeyInfoDao.createApplicationApplyKeyInfo(applicationApplykeyInfo);
	}

	@Override
	public void updateApplicationApplykeyInfo(
			ApplicationApplykeyInfo applicationApplykeyInfo) {
		applicationApplyKeyInfoDao.updateApplicationApplykeyInfo(applicationApplykeyInfo);
	}

	@Override
	public void deleteApplicationApplykeyInfo(
			ApplicationApplykeyInfo applicationApplykeyInfo) {
		applicationApplyKeyInfoDao.deleteApplicationApplykeyInfo(applicationApplykeyInfo);
	}

	@Override
	public ApplicationApplykeyInfo findApplicationApplykeyInfoBySystemid(
			int systemid) {
		return applicationApplyKeyInfoDao.findApplicationApplykeyInfoBySystemid(systemid);
	}

	@Override
	public List<ApplicationApplykeyInfo> listAllApplicationApplykeyInfos() {
		return applicationApplyKeyInfoDao.listAllApplicationApplykeyInfos();
	}

	@Override
	public ApplicationApplykeyInfo findApplicationApplyKeyInfoByName(
			String appName) {
		return applicationApplyKeyInfoDao.findApplicationApplyKeyInfoByName(appName);
	}

	@Override
	public ApplicationApplykeyInfo findApplicationApplykeyInfoByNameKey(
			String appName, String key) {
		return applicationApplyKeyInfoDao.findApplicationApplykeyInfoByNameKey(appName, key);
	}

	@Override
	public List<ApplicationApplykeyInfo> listApplicationApplykeyInfosByDate(
			Date startTime, Date endTime, String timeType) {
		return applicationApplyKeyInfoDao.listApplicationApplykeyInfosByDate(startTime, endTime, timeType);
	}

}
